﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Site.Master" AutoEventWireup="true"
    CodeBehind="Month.aspx.cs" Inherits="Bookkeeping.Web.Month" %>
    
<%@ Register Src="~/UserControls/PostListControl.ascx" TagPrefix="bk" TagName="PostListControl" %>
<%@ Register Src="~/UserControls/TotalControl.ascx" TagPrefix="bk" TagName="TotalControl" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="subheaderPlaceHolder" runat="server">
    <a ID="previousMonthLink" runat="server"><</a> <%=MonthAndYear %> <a ID="nextMonthLink" runat="server">></a>
</asp:Content>
    
<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolder" runat="server">

    <asp:UpdatePanel ID="mainUpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <bk:PostListControl ID="savingsList" runat="server" Title="Savings" />
            <bk:PostListControl ID="expensesList" runat="server" Title="Expenses" />
            <bk:PostListControl ID="incomesList" runat="server" Title="Incomes" />
            <bk:TotalControl ID="totalControl" runat="server" />

            <asp:Button ID="addPostButton" runat="server" Text="Add Post" />
            
            <ajaxtoolkit:modalpopupextender ID="modalPopupExtender" runat="server" 
                TargetControlID="addPostButton" CancelControlID="cancelAddPostButton"
                PopupControlID="addPostPopupPanel" BackgroundCssClass="modalPopupBackground" />
        </ContentTemplate>
    </asp:UpdatePanel>

    <asp:Panel ID="addPostPopupPanel" runat="server" CssClass="modalPopup form" style="display: none">
        <asp:UpdatePanel ID="popupUpdatePanel" runat="server" UpdateMode="conditional">
            <ContentTemplate>
                <label>Type:</label>
                <asp:DropDownList ID="postTypeList" runat="server" class="dialogFormControl" />

                <label>Amount:</label>
                <asp:TextBox ID="postNameTextbox" runat="server" class="dialogFormControl" />

                <asp:Button ID="cancelAddPostButton" runat="server" Text="Cancel" CssClass="dialogButton" />
                <asp:Button ID="submitAddPostButton" runat="server" Text="Ok" CssClass="dialogButton" 
                    OnClick="submitAddPostButton_Click" />
            </ContentTemplate>
        </asp:UpdatePanel>  
    </asp:Panel>

</asp:Content>
